<h2><%= @food_item.name %></h2>

<table class="data">
    <tr>
      <td>Price:</td>
      <td><%= number_to_currency @food_item.price %></td>
    </tr>
    <tr>
      <td>Cost:</td>
      <td><%= number_to_currency @food_item.cost %></td>
    </tr>
    <tr>
      <td>Profit:</td>
      <td><%= number_to_currency @food_item.profit %></td>
    </tr>
</table>

<table class="data">
    <tr>
      <th>Ingredient</th>
      <th>Quantity</th>
      <th>Unit</th>
    <tr>

<% for ingredient in @food_item.ingredients %>
    <tr>
      <td><%= ingredient.ingredient_type.name %></td>
      <td><%= ingredient.quantity %></td>
      <td><%= ingredient.ingredient_type.unit %></td>
    </tr>
<% end %>

</table>

<hr/>

<%= link_to 'Edit', edit_food_item_path(@food_item) %> |
<%= link_to 'Back', food_items_path %>
